package com.wn.ziroom.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-23 02:27:54
 */
@Getter
@Setter
@TableName("t_user")
public class User {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 员工姓名
     */
    @TableField("user_name")
    private String name;

    /**
     * 手机号
     */
    @TableField("user_phone")
    private String phone;

    /**
     * 密码
     */
    @TableField("user_password")
    private String password;

    /**
     * 登陆账号
     */
    @TableField("user_birth")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birth;

    /**
     * 房屋ID
     */
    @TableField("user_username")
    private String username;

    @TableField("start_time")
    private Date starttime;
    @TableField("end_time")
    private Date endtime;


    public User() {
    }

    public User(Integer id, String name, String phone, String password, Date birth, String username, Date starttime, Date endtime) {
        this.id = id;
        this.name = name;
        this.phone = phone;
        this.password = password;
        this.birth = birth;
        this.username = username;
        this.starttime = starttime;
        this.endtime = endtime;
    }
}
